Skip to main content

Half-precision Deformation Data

In the preskinning path, Rukhanka Animation stores each deformed vertex's position, normal, and tangent in a GPU buffer. The single-precision layout is equivalent to the following HLSL declaration:

struct DeformedVertex
{
float3 position;
float3 normal;
float3 tangent;
};

Its buffer stride is 9 * 4 = 36 bytes per vertex. Half-precision mode encodes the nine values as 16-bit floats and packs them into five 32-bit words:

struct PackedDeformedVertex
{
uint4 pack0;
uint pack1;
};

The actual packed buffer stride is 20 bytes per vertex, including the unused half-word. Compared with 36-byte vertices, this reduces the deformed vertex buffer's storage by about 44%. It does not halve every deformation buffer or the total rendering memory use.

Reduced buffer traffic can improve performance, but the result depends on the GPU and workload. Lower precision can introduce visible errors, especially with large position values or small surface details. Compare representative animations, camera distances, and target hardware before enabling it.

Enable Half-precision deformation data in Settings. This setting applies to the preskinned output buffer. It is unavailable with in-place skinning, which does not store intermediate deformed vertices.